package org.example.orders.filter;

import com.alibaba.csp.sentinel.adapter.spring.webmvc.callback.RequestOriginParser;
import jakarta.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Component;
import org.springframework.util.StringUtils;
@Component
public class MyOrderFilter implements RequestOriginParser {
    @Override
    public String parseOrigin(HttpServletRequest httpServletRequest) {
        String value = httpServletRequest.getHeader("aaabbbccc");
        if(StringUtils.isEmpty(value)){
            return "没有登录";
        }
        return value;
    }
}
